$(function(){
    $('#excelTable').bootstrapTable({
        url: '/Salary/ManagerSalary',
        method: 'post',
        showRefresh: true,  //显示刷新按钮
        search: true,
        toolbar:'#toolbar',
        striped : true,     //设置为true会有隔行变色效果
        //sidePagination:'server',//服务器端分页默认接受rows和total
        pagination:true,//客户端分页
        sidePagination:'client',
        idFiled:'studentSelectCourseId',
        pageNumber:1,
        pageSize:10,
        columns: [
            {
                field: 'checkId',
                checkbox:true,
                clickToSelect:true,
            },
            {
                field: 'userid',
                title: '用户ID',
            },{
                field: 'name',
                title: '姓名'
            }
            , {
                field: 'posname',
                title: '岗位名'
            },{
                field: 'salary',
                title: '底薪'
            },{
                field:'attendence',
                title:'奖金',
                formatter:function (attendence) {
                    if(attendence ==1){
                        return 200;
                    }
                }

            },{
                field:'salary_id',
                title:'薪资统计',
                formatter:function (salary_id,row) {
                    if(row.attendence==1){
                        return 200+row.salary;
                    }else {
                        return row.salary;
                    }
                }
            }
            ]
    });
});

var vm = new Vue({
    el:'#RunTable',
    data:{
        showList: 1,
    },
    methods: {
        excel:function () {
          var form = $("<form method='post'></form>");
          form.attr("action","/Salary/ExcelSalary");
            $("body").append(form);
            form.submit();
            form.remove();
        }
    }

});